package at.fhooe.mc.master.clc.server.domain.datastorenative;

import java.util.Date;

import com.google.appengine.api.datastore.Key;

import at.fhooe.mc.master.clc.server.domain.AbstractTestable;
import at.fhooe.mc.master.clc.server.domain.ISmallEntity;

public class SmallEntityDatastoreNative extends AbstractNativeDatastoreEntity implements ISmallEntity
{

	private String stringField;
	private int intField;
	private double doubleField;
	private Date dateField;
	
	public SmallEntityDatastoreNative() {}
	
	public SmallEntityDatastoreNative(String stringField, int intField,
			double doubleField, Date dateField)
	{
		super();
		this.stringField = stringField;
		this.intField = intField;
		this.doubleField = doubleField;
		this.dateField = dateField;
	}



	public SmallEntityDatastoreNative(boolean generate)
	{
		if (generate)
		{
			this.stringField = "String Test Field";
			this.intField = 42;
			this.doubleField = 42.42;
			this.dateField = new Date();
		}
	}
	
	@Override
	public Long getId()
	{
		return this.id.getId();
	}
	
	@Override
	public String getStringField()
	{
		return this.stringField;
	}

	@Override
	public int getIntField()
	{
		return this.intField;
	}

	@Override
	public double getDoubleField()
	{
		return this.doubleField;
	}

	@Override
	public Date getDateField()
	{
		return this.dateField;
	}
	
	@Override
	public String getDistinguishable()
	{
		return this.stringField;
	}
	
	@Override
	public void setDistinguishable(String uuid)
	{
		this.stringField = uuid;
	}

}
